package com.cmc.cloud.cmclink.doc.vo.blnospiltcombinevo;

import com.cmc.cloud.cmclink.doc.configuration.CustomLocalDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;

import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 提单拆并申请主 Base VO，提供给添加、修改、详细的子 VO 使用 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 * 
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlnoSpiltCombineBaseVO {

    @Schema(description = "操作编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnospiltcombine.operationno.notblank}")
    @Length(max = 30, message = "{blnospiltcombine.operationno.length}")
    private String operationNo;

    @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "{blnospiltcombine.approvestatus.notblank}")
    @Length(max = 20, message = "{blnospiltcombine.approvestatus.length}")
    private String approveStatus;

    @Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "{blnospiltcombine.operationtype.notblank}")
    @Length(max = 20, message = "{blnospiltcombine.operationtype.length}")
    private String operationType;

    @Schema(description = "申请人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnospiltcombine.applyuser.notblank}")
    @Length(max = 64, message = "{blnospiltcombine.applyuser.length}")
    private String applyUser;

    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnospiltcombine.applytime.notnull}")
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime applyTime;

    @Schema(description = "审批人")
    @Length(max = 64, message = "{blnospiltcombine.approveuser.length}")
    private String approveUser;

    @Schema(description = "审批时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime approveTime;

}
